1. Field of the Invention
The invention relates to Universal Serial Bus (USB) circuits utilized in USB devices and USB hubs. Specifically, the invention relates to circuitry used to detect whether the hub or device is connected to a USB host, i.e. to detect connection status of the device or hub.
2. Description of the Prior Art
A USB standard has been developed which allows up to 127 peripheral devices such as printers, scanners, keyboards, modems, telephones, cameras and storage devices to be attached to a host, usually a personal computer (PC), through a 4-wire bus. Such devices can be connected to the PC either directly, or via hubs. The hubs provide additional connections to the USB. USB has the advantage that connection of different types of devices becomes standardized. Furthermore, a device can be connected while the PC is switched on and while other devices are in use.
Taking the operation of a device as an example, the device is connected to a USB port provided by the PC or a hub. Once physically connected to the device, the PC controls attachment and configuration of the device. To achieve this, the PC is installed with a USB driver, which is usually provided by the PC's operating system. The PC is also installed with a device driver so that applications software on the PC can use the device once it has been attached and configured. The device driver is often provided by the operating system although for unusual devices, a user may need to install a specific device driver using installation disks.
Devices can be categorized in terms of the number of functions they perform. Most devices, such as a mouse, implement a single function. Some devices, such as a monitor having in-built speakers, implement multiple functions and have an embedded hub. Such a device is known as a compound device and appears to the PC as a hub with a collection of individual, non-removable functions. In the specific case of when a single function device, such as a mouse, is plugged into a PC for the first time, the USB driver detects, identifies and configures the device, and the operating system automatically assigns a device driver which, in the case of a mouse, is a mouse driver. Alternatively, and as mentioned above, a user may install and/or assign a specific device driver. When a compound device is plugged in for the first time the same process of detection, identification and configuration is carried out for each respective function so that all the functions of the compound device are available to the PC. To make this process work efficiently, a USB device needs to be able to detect that it has been connected to a USB host so that the USB device may begin to respond to the communication from the host. Similarly, the USB device needs to know when the USB device has been disconnected from the USB host, and is able to differentiate between disconnection and a silent period during communication.
Although a USB circuit herein includes circuits incorporated into hubs per se, embedded hubs, and devices with single or multiple functions, for the sake of simplicity, the discussions below focus on the application and advantages of the invention with particular reference to USB device circuits.
Simple devices, such as a mouse, do not have a power supply but operate by using power from the host sent down a 5V ‘Vbus’ line. The devices are only operational when they have power from the host and thus it is a relatively simple manner to configure the devices so that the devices recognize that connection to a host. Such devices are known as ‘bus powered’ devices. However, many devices require more power than can be supplied by the Vbus line, and may also operate independently of the host e.g. mobile telephones and MP3 players. Therefore, these devices require ‘self powering’—i.e. they have their own power supply. As these devices are operational without having to be connected to a host, these devices require relatively complicated circuitry to identify whether or not connection to a host exists. However, in the case of both bus-powered and self-powered devices, the Vbus power supply line is central to determining connection status (usb2.0 specification, http://www.usb.org) as the use of the Vbus power supply line is not only reliable in indicating connection status, but also assists in resisting lock up conditions.
The invention is only applicable to self-powered devices (or hubs), and thus only the existing operation of such devices is considered. In practice, a microprocessor in the self-powered device circuitry is configured to analyze the signal from the Vbus line and determine whether a connection has been made based on the presence or absence of a signal. A drawback of this method is the use of a separate Input/Output (I/O) pin of a severely pin limited microprocessor to solely determine the connection status. Furthermore, additional circuit components are required to adapt the Vbus signal into a form suitable for the microprocessor. This is because the USB device microprocessor, in today's low voltage technology, is only capable of utilizing signalling of a much lower voltage than 5V. Also, the microprocessor may be sensitive to fluctuations in voltage (noise) which are known to occur in the Vbus line. This necessitates the requirement for the Vbus signal to be initially passed through a separate voltage comparator circuit which both reduces the strength of the signal and regulates the signal supplied to the microprocessor within the required stringent tolerance. However, the comparator is a relatively expensive component, which is also relatively large and thus occupies valuable space on a circuit board. Tracking complexity is also increased.
The USB standard defines that differential signalling be used to remove noise added to the data. Differential signalling is known in the art and is used to compare a first data signal with a corresponding inverse second data signal, each of these signals being sent down separate data lines. As it is known that the second signal should generally be a mirror image of the first signal, it is possible to identify and correct inconsistencies between the data signals. Thus, at least two separate data signalling lines are currently available in USB devices.